<?php
namespace Product\Entity;

class Category {
    
    protected $id;

    /**
     * @var string
     */
    protected $name;
    
    public function getId() {
        return $this->id;
    }

    public function setId($id) {
        $this->id = $id;
    }

        
    /**
     * @param string $name
     * @return Category
     */
    public function setName($name) {
        $this->name = $name;
        return $this;
    }

    /**
     * @return string
     */
    public function getName() {
        return $this->name;
    }
    
    public function populate($data = array()) 
    {
        $this->id = $data['id'];
        $this->name = 'huy';//$data['name'];
    }
}
